package com.gy.smartmanagement.login.dagger;

import com.gy.smartmanagement.base.scope.FragmentScoped;
import com.gy.smartmanagement.login.api.LoginApiService;
import com.gy.smartmanagement.login.mvp.LoginContract;

import dagger.Module;
import dagger.Provides;
import retrofit2.Retrofit;


/**
 * Created by MVPModule on 11/15/2019 11:55
 */
@Module
public class LoginModule {
  private LoginContract.IView mIView;

  public LoginModule(LoginContract.IView mIView) {
    this.mIView = mIView;
  }

  @FragmentScoped
  @Provides
  LoginContract.IView providesLoginContractIView() {
    return mIView;
  }

  @FragmentScoped
  @Provides
  LoginApiService getLoginApiService(Retrofit retrofit) {
    return retrofit.create(LoginApiService.class);
  }
}